package
system.agent;

import java.io.Serializable;

import system.util.message.Message;

/* The system calls of an agent objet.
   init - for initializing the agent. You must provide its "name"
   and the "hostname" where the agent was created.

   setNameServer - assign the name server variable that the agent
   may use on the server in order to get java references.

   move - the migration primitive which allows the agent to move
   to another machine.

   main - the main entry point of the agent. This is an abstract
   method that the agent must implement. It is invoked
   each time the agent arrives on a new host.
 */

public interface AgentInterface extends Serializable, CommunicationAgentInterface {
	
	/**
	 * Move to another place
	 * @param machine host machine
	 * @param port host port
	 */
	public void move(String machine, int port);
	
	/**
	 * method called when an agent arrive on a new place
	 */
	public void main();
	
	/**
	 * Send a message to another agent
	 */
	public void sendMessage(String to, Message message);
	
}